from flask import request, render_template

import app.mod_user.controllers as user_c
from app import app


@app.route('/login', methods=['GET', 'POST'])
def do_login_do():
    if request.method == 'GET':
        return render_template("login.html")
        username = request.form['username']
        password = request.form['password']
        user = user_c.select_by_password(username, password)
    if user:
        return redirect(url_for('index'))
